# AprilCalib log 7
# CalibRig::mode=2d
# @ Mon Nov 25 12:08:27 2019

from numpy import array
U=array([[404.2183532714844, 368.4971923828125, 307.4286193847656, 405.1181945800781, 308.444091796875, 369.3466186523438, 337.0310974121094, 337.5975341796875, 369.7819213867188, 405.3292541503906, 309.1209411621094, 309.5211486816406, 369.5198364257813, 337.9032592773438, 404.4329833984375, 310.2140502929688, 368.840576171875, 402.76416015625, 338.0072631835938],
       [260.3218078613281, 263.6488342285156, 268.57275390625, 305.3597106933594, 306.1993103027344, 305.7718505859375, 306.3060302734375, 345.6490478515625, 348.2731323242188, 350.2512512207031, 343.3697509765625, 379.554443359375, 388.2860107421875, 383.9454040527344, 392.7279357910156, 413.5161743164063, 426.2455139160156, 432.1355895996094, 419.9169921875]], dtype='float64');
Xw=array([[1499.504516601563, 1299.504516601563, 899.5044555664063, 1499.504516601563, 899.5044555664063, 1299.504516601563, 1099.504516601563, 1099.504516601563, 1299.504516601563, 1499.504516601563, 899.5044555664063, 899.5044555664063, 1299.504516601563, 1099.504516601563, 1499.504516601563, 899.5044555664063, 1299.504516601563, 1499.504516601563, 1099.504516601563],
       [99.50446319580078, 99.50446319580078, 99.50446319580078, 299.5044555664063, 299.5044555664063, 299.5044555664063, 299.5044555664063, 499.5044555664063, 499.5044555664063, 499.5044555664063, 499.5044555664063, 699.5044555664063, 699.5044555664063, 699.5044555664063, 699.5044555664063, 899.5044555664063, 899.5044555664063, 899.5044555664063, 899.5044555664063],
       [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype='float64');
# After LM:
K=array([[427.2140095480562, 0, 313.6253241773876],
       [0, 425.8352551312348, 250.4189291847609],
       [0, 0, 1]], dtype='float64');
distCoeffs=array([-0.3805572138146396,
       0.1285382239978525,
       0.0007398479341745259,
       -0.009041598962313458,
       0], dtype='float64');
CovK=array([[0.05932138710021484, 0.05672516902960274, -0.01868644793263072, -0.0153740736984784, -0.0001340465473466816, 0.0002010424933322173, 7.403690894711139e-06, 1.137773058000078e-05, -8.369301565160986e-05],
       [0.05672516902960205, 0.0552089379643587, -0.01730268249112223, -0.01303499961688649, -0.0001277932308631003, 0.0001903979927595783, 6.56403075203417e-06, 1.086336194260004e-05, -7.911247494349745e-05],
       [-0.01868644793230436, -0.01730268249086097, 0.03479322335428049, 0.007544738215701508, 3.126062285217387e-05, -5.221001347245427e-05, -2.09362180495221e-06, -1.310514706750474e-05, 3.647322076012537e-05],
       [-0.0153740736986694, -0.01303499961704621, 0.007544738216731492, 0.03469521975628855, 3.31306938099441e-05, -4.742021195972188e-05, -1.144590886591872e-05, -4.524973439298617e-06, 5.382761235496403e-06],
       [-0.0001340465473467899, -0.0001277932308631999, 3.126062285295726e-05, 3.313069380957096e-05, 6.893864856734009e-07, -1.435278433439785e-06, -1.78220900118791e-08, -2.339038379287282e-08, 8.144429637515044e-07],
       [0.0002010424933323256, 0.0001903979927596869, -5.221001347357256e-05, -4.74202119588346e-05, -1.435278433439525e-06, 3.519113336742572e-06, 3.544206758787068e-08, 2.871962738136812e-08, -2.188851672756959e-06],
       [7.403690894776958e-06, 6.564030752087738e-06, -2.093621805280343e-06, -1.144590886595745e-05, -1.782209001201286e-08, 3.544206758817649e-08, 5.739698603895296e-09, 1.499094351355376e-09, -1.189073199924285e-08],
       [1.137773057989283e-05, 1.086336194251336e-05, -1.310514706754153e-05, -4.52497343893857e-06, -2.339038379260952e-08, 2.871962738100567e-08, 1.499094351239227e-09, 8.361540092159044e-09, -1.59409588919259e-08],
       [-8.369301565138499e-05, -7.911247494332631e-05, 3.647322076007352e-05, 5.382761234440296e-06, 8.144429637507548e-07, -2.188851672755946e-06, -1.189073199891296e-08, -1.594095889187012e-08, 1.453810086175961e-06]], dtype='float64');
# rms=0.33819
r0=array([0.161010686488657,
       0.1658995699393129,
       -1.951291629818027], dtype='float64');
t0=array([-624.440733144951,
       711.3190204719484,
       1978.996203556685], dtype='float64');
Covr0=array([[4.095026087719564e-07, -3.826699190292948e-08, 2.468978226993074e-08],
       [-3.826699190016654e-08, 2.958897968155728e-07, 3.562555410218299e-08],
       [2.468978226997833e-08, 3.562555410169768e-08, 1.285125031989857e-08]], dtype='float64');
Covt0=array([[0.7511047968992473, 0.1836805023582324, 0.4157947813671354],
       [0.1836805023802123, 0.7387712667559285, 0.06304427846234925],
       [0.4157947813663342, 0.06304427845649821, 1.195742882301843]], dtype='float64');
r1=array([-0.1689677377700181,
       0.07141227161575393,
       -0.03303508861902971], dtype='float64');
t1=array([-629.7789642939439,
       -577.0121735124427,
       1794.226986339765], dtype='float64');
Covr1=array([[2.055196111032588e-07, -1.530389272060174e-08, -9.130096317404015e-09],
       [-1.530389271818682e-08, 1.663249064913526e-07, 1.638814934436374e-08],
       [-9.130096317076071e-09, 1.63881493444039e-08, 5.161221354273654e-09]], dtype='float64');
Covt1=array([[0.6083454370799098, 0.1250267930664133, 0.4596420233809746],
       [0.1250267930842438, 0.5911431644666751, 0.3742324968621946],
       [0.4596420233895582, 0.3742324968543825, 1.185717656641502]], dtype='float64');
r2=array([-0.1174663627308991,
       -0.05833321150131524,
       0.6871628270052664], dtype='float64');
t2=array([-124.8786439626436,
       -1133.282175339805,
       1645.155246004339], dtype='float64');
Covr2=array([[2.135936646762229e-07, 1.163509280941893e-09, -8.232135386334289e-09],
       [1.163509284327789e-09, 1.852106572319972e-07, 2.253912537812151e-08],
       [-8.23213538585837e-09, 2.25391253783548e-08, 6.471136914126109e-09]], dtype='float64');
Covt2=array([[0.5487120735670492, 0.114401928247063, 0.346851943320542],
       [0.114401928262748, 0.5230743081000091, 0.449652539897907],
       [0.3468519433326991, 0.4496525398943376, 1.155385269222853]], dtype='float64');
r3=array([-0.2804414115678052,
       -0.001195415888564638,
       0.06250515721438736], dtype='float64');
t3=array([-724.2916932751533,
       -621.2068841768254,
       1752.589248460142], dtype='float64');
Covr3=array([[1.929673621563594e-07, -1.29280848115949e-08, -7.373789426478432e-09],
       [-1.292808480850641e-08, 1.546389294565563e-07, 2.200650208004457e-08],
       [-7.373789425920842e-09, 2.200650208013393e-08, 6.662681974626412e-09]], dtype='float64');
Covt3=array([[0.5741789268299072, 0.1189787350431843, 0.458702639258376],
       [0.1189787350604283, 0.5708515782275061, 0.3927799588368126],
       [0.4587026392673886, 0.3927799588296827, 1.161441553763778]], dtype='float64');
r4=array([-0.4508818940076567,
       0.3310479165673074,
       -1.414785353192456], dtype='float64');
t4=array([-530.7925282179348,
       706.7628604385768,
       1738.694163927488], dtype='float64');
Covr4=array([[2.748851594895575e-07, -3.711587530187156e-08, 2.08349473109418e-09],
       [-3.711587529761823e-08, 1.508942103435048e-07, 3.633130341131972e-08],
       [2.083494732459069e-09, 3.63313034110671e-08, 1.34738602064183e-08]], dtype='float64');
Covt4=array([[0.5801807133340712, 0.1414531814648998, 0.3803910719420462],
       [0.1414531814816411, 0.5694402256470295, 0.06137550407844909],
       [0.3803910719409003, 0.0613755040720485, 0.8394880386744494]], dtype='float64');
r5=array([-0.770565834015802,
       0.8857211410698083,
       -1.223154564812345], dtype='float64');
t5=array([173.8539148709638,
       405.9885990693284,
       1982.739809648417], dtype='float64');
Covr5=array([[2.565179679443061e-07, -1.736092483824867e-08, 1.734769387294733e-08],
       [-1.736092483370341e-08, 1.468397706150754e-07, 6.55950456297683e-08],
       [1.734769387552591e-08, 6.559504562901595e-08, 4.719709885844562e-08]], dtype='float64');
Covt5=array([[0.7356428234831269, 0.1410628930823614, 0.2337398279915958],
       [0.1410628931039528, 0.7262670500881667, 0.0769993956351106],
       [0.2337398279918452, 0.07699939563233318, 0.5572774131070326]], dtype='float64');
r6=array([0.2780051529830558,
       -0.07116683638640106,
       0.06799599907922171], dtype='float64');
t6=array([-1321.54704231135,
       -146.5713568194081,
       2315.003045505366], dtype='float64');
Covr6=array([[3.691612226108258e-07, -3.268814624217536e-08, 2.799918006683422e-08],
       [-3.268814623827811e-08, 3.566532184690433e-07, -6.411839460804001e-08],
       [2.799918006591948e-08, -6.411839460825812e-08, 2.298703478963497e-08]], dtype='float64');
Covt6=array([[1.066164157714422, 0.2473487098164851, 0.8464057578576835],
       [0.2473487098492733, 1.175508097627538, 0.6813465703911336],
       [0.8464057578707651, 0.6813465703757686, 2.539571959755516]], dtype='float64');
r7=array([-0.08880964390472666,
       0.7627753019386023,
       -0.05692630979181858], dtype='float64');
t7=array([-682.0889083653359,
       72.37820580147056,
       2895.661983060609], dtype='float64');
Covr7=array([[3.491400167220447e-07, -2.758032049485158e-08, 5.764662361027962e-08],
       [-2.758032048834391e-08, 3.563572899485562e-07, -3.719713615679912e-08],
       [5.764662360975898e-08, -3.719713615916314e-08, 4.758581253692867e-08]], dtype='float64');
Covt7=array([[1.678781971921628, 0.3959470184637262, 1.013275437592168],
       [0.3959470185134992, 1.612939041464953, 0.5792763594365095],
       [1.013275437602485, 0.5792763594188421, 1.73968684781428]], dtype='float64');
